<template>
	<view class="my_prize">
		<uni-nav-bar fixed status-bar :border="false" left-icon="left" title="我的奖品" @clickLeft="back" />
		<view class="tabs">
			<view :class="{ active: type == '1' }" @click="selectEvt('1')">兑奖码列表</view>
			<view :class="{ active: type == '2' }" @click="selectEvt('2')">我的奖品</view>
		</view>
		<duijiangmaList v-if="type == '1'" />
		<jianpinglLst v-if="type == '2'" />
	</view>
</template>
<script>
	import duijiangmaList from './duijiangmaList';
	// import jianpinglLst from './jianpinglLst';
	export default {
		components: {
			duijiangmaList,
			// jianpinglLst
		},
		data() {
			return {
				type: '1'
			}
		},
		onLoad(options) {
			this.type = options.type ? options.type : "1";
		},
		methods: {
			back() {
				uni.navigateBack();
			},
			selectEvt(value) {
				this.type = value;
			}
		}
	}
</script>
<style lang="scss" scoped>
	.my_prize {
		.tabs {
			display: flex;
			flex-wrap: nowrap;
			justify-content: space-between;
			background-color: #fff;
			padding: 10rpx 20rpx 0;

			&>view {
				flex-grow: 1;
				text-align: center;
			}

			.active {
				font-weight: bold;

				&::after {
					content: '';
					display: block;
					width: 50rpx;
					height: 6rpx;
					background-color: #000;
					margin-left: 50%;
					margin-top: 10rpx;
					transform: translateX(-50%);

				}
			}

		}
	}
</style>